package com.example.demo.TextTest;

import com.example.demo.TextTest.entity.SimulaEntity;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class MapList {
    public static void main(String[] args) {
        List<SimulaEntity> simulaEntities = Arrays.asList(new SimulaEntity(1L, 10L, 100L, null),
                new SimulaEntity(2L, 20L, 200L, null),
                new SimulaEntity(3L, 30L, 300L, null));
        List<Long> sort = Arrays.asList(9L, 99L, 999L);
        List<SimulaEntity> objects = new ArrayList<>();
        sort.forEach(sortInfo -> simulaEntities.forEach(simulaInfo -> {
            SimulaEntity cloned = simulaInfo.clone();
            cloned.setQuantitySingleDose(sortInfo);
            objects.add(cloned);
        }));
        System.out.println(objects);
    }
}
